<div class="bjui-pageContent tableContent">
<form action="{:U('freight_order')}" data-callback="dialogFormCall" data-toggle="validate" data-alertmsg="false" class="dialogForm">
    <input type="hidden" name="id" value="{$va.id}"/>
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="false">
        <thead>
        <tr>
            <th>收货人</th>
            <th>地址</th>
            <th>电话</th>
            <th>发票类型</th>
            <th>发票抬头</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>{$va.accept_name}</td>
            <td>{:area_name($va['province'])}{:area_name($va['city'])}{:area_name($va['area'])}{:area_name($va['towns'])}{$va.address}</td>
            <td>{$va.mobile}</td>
            <td>{$va.invoice_type}</td>
            <td><if condition="$va.invoice_type neq '不需要发票'">{$va.invoice_title}</if></td>
        </tr>
        </tbody>
    </table>
    <h5 class="text-center">商品信息</h5>
    <table class="table table-bordered table-hover table-striped " data-selected-multi="false">
        <thead>
        <tr>
            <th>商品名称</th>
            <th>属性</th>
            <th>数量</th>
            <th>单价</th>
            <th>是否发货</th>
            <th>选择</th>
        </tr>
        </thead>
        <tbody>
        <volist name="ordergoods" id="oo">
        <tr>
            <td><a href="javascript:void(0)" target="_blank">{$oo.name}</a></td>
            <td>{:spec_detail($oo['goods_id'],$oo['spec_array'])}</td>
            <td>{$oo.goods_nums}</td>
            <td>{$oo.goods_price}</td>
            <td><if condition="$oo.is_send eq '1'">是<else/>否</if></td>
            <td><if condition="$oo.is_send neq '1'"><input type="checkbox" name="goods_id[]" value="{$oo.id}"/></if></td>
        </tr>
        </volist>
        </tbody>
    </table>
    <neq name="va['order_status']" value="1">
        <h5 class="text-center" ><i class="fa fa-truck" style="color: #DC8E70;"></i> 发货信息</h5>
        <table class="table table-bordered table-hover table-striped " data-selected-multi="false">
            <thead>
            <tr>
                <th>操作者</th>
                <th>发货时间</th>
                <th>发货单号</th>
                <th>物流公司</th>
                <th>备注</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <volist name="freightlist" id="fo">
            <tr>
                <td>{$fo.username}</td>
                <td>{$fo.time}</td>
                <td>{$fo.delivery_code}</td>
                <td>{$fo.name}</td>
                <td>{$fo.note}</td>
                <td><a href="http://www.kuaidi100.com/" target="_blank">查看物流</a></td>
            </tr>
            </volist>
            </tbody>
        </table>
    </neq>
    <!--
        Think.get.type === 1  即是已发货,
    -->
    <neq name="va['order_status']" value="3">
        <div class="content-padding">
            <form action="{:U('Index/save')}" data-callback="dialogFormCall" data-toggle="validate" data-alertmsg="false" class="dialogForm">
                <div class="form-group">
                    <label class="x100">物流公司:</label>
                    <select name="freight_id" data-toggle="selectpicker">
                        <option value>--请选择--</option>
                        <volist name="freight" id="fo">
                        <option value="{$fo.id}">{$fo.name}</option>
                        </volist>
                    </select>
                </div>
                <div class="form-group">
                    <label class="x100">单号:</label>
                    <input type="text" name="delivery_code" data-rule="required" />
                </div>
                <div class="form-group">
                    <label class="x100">备注:</label>
                    <textarea name="note" class="w400"></textarea>
                </div>
            </form>
        </div>
    </neq>
    
</form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <neq name="va['order_status']" value="3">
            <li><button type="submit" class="btn-default" data-icon="save">确认发货</button></li>
        </neq>
        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
    </ul>
</div>
